<template>
  <div>
    <p class="title">临 床 知 识 库 (维护)</p>
    <div class="box">
      <div>
        <div
          class="box-item"
          v-for="item in xyList"
          :key="item.id"
          @click="Toto(item)"
        >
          <el-image
            style="width: 80px; height: 80px"
            :src="item.img"
            fit="cover"
          ></el-image>
          <p class="box-title">{{ item.title }}</p>
        </div>
      </div>
      <div style="margin-top: 30px">
        <div
          class="box-item"
          v-for="item in zyList"
          :key="item.id"
          @click="Toto(item)"
        >
          <el-image
            style="width: 80px; height: 80px"
            :src="item.img"
            fit="cover"
          ></el-image>
          <p class="box-title">{{ item.title }}</p>
        </div>
      </div>
    </div>
    <p class="footer"></p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      xyList: [
        {
          img: require("@/assets/image/西医01.png"),
          title: "药品数据",
          url: "/#/xy/YPSMS_WH",
          id: 1,
        },
        {
          img: require("@/assets/image/西医01.png"),
          title: "病例数据",
          url: "/xy/BLSJ_WH",
          id: 19,
        },
        {
          img: require("@/assets/image/西医05.png"),
          title: "医学文献",
          url: "/#/xy/LCZN_WH",
          id: 5,
        },
        {
          img: require("@/assets/image/西医05.png"),
          title: "学术报告",
          url: "/xy/XSBG_WH",
          id: 20,
        },
        {
          img: require("@/assets/image/西医07.png"),
          title: "检查检验",
          url: "/#/xy/LCJY_WH",
          id: 7,
        },
        {
          img: require("@/assets/image/中医07.png"),
          title: "关联关系",
          url: "/xy/GLGX_WH",
          id: 21,
        },
        {
          img: require("@/assets/image/中医06.png"),
          title: "前沿进展",
          url: "/#/zy/XDYA_WH",
          id: 12,
        },
        {
          img: require("@/assets/image/西医02.png"),
          title: "西医-疾病数据",
          url: "/#/xy/JBDQ_WH",
          id: 2,
        },
        {
          img: require("@/assets/image/西医03.png"),
          title: "西医-药物专论",
          url: "/#/xy/YWZL_WH",
          id: 3,
        },
        {
          img: require("@/assets/image/西医04.png"),
          title: "西医-手术大全",
          url: "/#/xy/SSDQ_WH",
          id: 4,
        },

        {
          img: require("@/assets/image/西医06.png"),
          title: "西医-临床路径",
          url: "/#/xy/LCLJ_WH",
          id: 6,
        },
      ],
      zyList: [
        {
          img: require("@/assets/image/中医01.png"),
          title: "中医-疾病数据",
          url: "/#/zy/JBDQ_WH",
          id: 8,
        },
        {
          img: require("@/assets/image/中医02.png"),
          title: "中医-临床路径",
          url: "/#/zy/LCLJ_WH",
          id: 9,
        },
        {
          img: require("@/assets/image/中医03.png"),
          title: "中医-诊疗方案",
          url: "/#/zy/ZLFA_WH",
          id: 10,
        },
        {
          img: require("@/assets/image/中医04.png"),
          title: "中医-术语字典",
          url: "/#/zy/SYZD_WH",
          id: 19,
        },
        {
          img: require("@/assets/image/中医05.png"),
          title: "中医-草药大全",
          url: "/#/zy/FJDQ_WH",
          id: 11,
        },

        {
          img: require("@/assets/image/中医07.png"),
          title: "中医-名医医案",
          url: "/#/zy/MYYA_WH",
          id: 13,
        },
        {
          img: require("@/assets/image/中医08.png"),
          title: "中医-疾病术语",
          url: "/#/zy/JBSY_WH",
          id: 14,
        },
        {
          img: require("@/assets/image/中医09.png"),
          title: "中医-症候术语",
          url: "/#/zy/ZHSY_WH",
          id: 15,
        },
        {
          img: require("@/assets/image/中医10.png"),
          title: "中医-方剂大全",
          url: "/#/zy/FJDQ2_WH",
          id: 16,
        },
        {
          img: require("@/assets/image/中医11.png"),
          title: "中医-治法术语",
          url: "/#/zy/ZFSY_WH",
          id: 17,
        },
        {
          img: require("@/assets/image/中医12.png"),
          title: "中医-基础理论术语",
          url: "/#/zy/JCLLSY_WH",
          id: 18,
        },
      ],
    };
  },
  methods: {
    Toto(item) {
      console.log(item);
      window.open(item.url);
    },
  },
};
</script>

<style>
.title {
  text-align: center;
  font-weight: 700;
  font-size: 32px;
  line-height: 160px;
  background-color: rgb(48, 145, 198);
  color: #fff;
}
.box {
  width: 50%;
  margin: 0 auto;
}
.box-item {
  text-align: center;
  width: 20%;
  display: inline-block;
}
.box-title {
  text-align: center;
}
.footer {
  margin: 0;
  padding: 0;
  width: 100%;
  background-color: rgb(1, 99, 164);
  color: #fff;
  text-align: center;
  line-height: 45px;
  position: absolute;
  bottom: 0;
}
</style>
